package com.sec.android.app.myfiles.module.download;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.sec.android.app.myfiles.R;
import com.sec.android.app.myfiles.fragment.home.HomeFragment;
import com.sec.android.app.myfiles.fragment.home.HomeFragmentItem;
import com.sec.android.app.myfiles.info.AppConstants.StoragePath;
import com.sec.android.app.myfiles.module.abstraction.FileRecord;
import com.sec.android.app.myfiles.module.abstraction.FileRecord.StorageType;

public class DownloadHomeItem extends HomeFragmentItem {

    FileRecord mDownloadRecord;

    DownloadHomeItem(Context context, HomeFragment fragment) {
        super(context, fragment);
    }

    @Override
    protected void setListItem() {
        HomeItemInfo item;
        HomeItemClickListener onclick;

        mDownloadRecord = FileRecord.createFileRecord(StorageType.Downloads, StoragePath.DOWNLOADS);
        onclick = new HomeItemClickListener(mDownloadRecord, "Category-Download history");
        item = new HomeItemInfo(R.id.home_list_item_download_history_stub, R.id.home_list_item_download_history,
                R.drawable.my_files_ic_download_history, R.color.home_icon_download_history_color, R.color.home_icon_download_history_bg_color, R.string.downloads, onclick);
        if (item.itemView != null) {
            TextView sizeView = (TextView) item.itemView.findViewById(R.id.home_list_item_text_second);
            setViewVisibility(sizeView, View.GONE);
        }
        mItemList.add(item);
    }

    @Override
    protected void _onResume() {
    }

    @Override
    protected void _onDestroy() {
    }

    @Override
    protected void _onPause() {
    }

}
